package com.lzb.newloan.utils;

import android.content.*;

public class SharedprefreferencesUtil
{
    private static SharedPreferences sharedPreferences;
    
    public static boolean getBooleanTool(final Context context, final String s) {
        SharedprefreferencesUtil.sharedPreferences = context.getSharedPreferences("diaosidai", 0);
        return SharedprefreferencesUtil.sharedPreferences.getBoolean(s, true);
    }
    
    public static String getStringTool(final Context context, final String s) {
        SharedprefreferencesUtil.sharedPreferences = context.getSharedPreferences("diaosidai", 0);
        return SharedprefreferencesUtil.sharedPreferences.getString(s, "");
    }
    
    public static void putBooleanTool(final Context context, final String s, final boolean b) {
        SharedprefreferencesUtil.sharedPreferences = context.getSharedPreferences("diaosidai", 0);
        SharedprefreferencesUtil.sharedPreferences.edit().putBoolean(s, b).commit();
    }
    
    public static void putStringTool(final Context context, final String s, final String s2) {
        SharedprefreferencesUtil.sharedPreferences = context.getSharedPreferences("diaosidai", 0);
        SharedprefreferencesUtil.sharedPreferences.edit().putString(s, s2).commit();
    }
}
